import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:testlzhu/bean/rent_bean.dart';
import 'package:testlzhu/view/imageweight.dart';

class RentItem extends StatelessWidget {
  late RentEquipments data;

  RentItem({Key? key, required this.data}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      margin: const EdgeInsets.only(left: 12, top: 10),
      child: Row(
        children: [
          ImageNetWidget(
            url: data.pic!,
            w: 101,
            h: 77,
            allRadius: 8,
          ),
          Container(
            margin: const EdgeInsets.only(left: 10),
            child: Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: [
                SizedBox(
                  child: Text(data.title!,softWrap: true,maxLines: 1, overflow: TextOverflow.ellipsis,),
                  width: 150,
                ),
                SizedBox(
                  width: 150,
                  child: Text(
                    data.productionyear! + " | " + data.address!,
                    overflow: TextOverflow.ellipsis,
                    softWrap: true,
                    maxLines: 1,
                  ),
                ),
                Text(
                  (data.rentpricelist!.isEmpty) ? "面议" : data.rentpricelist!,
                  style: TextStyle(color: Colors.red),
                ),
              ],
            ),
          )
        ],
      ),
    );
  }
}
